package com.stylefeng.guns.common.persistence.model;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@NoArgsConstructor
@Table(name = "t_game")
public class Game {

    @Builder
    public Game(String mid, String title, Integer lc, String time, String zhud, String ked, String homeGain, String homeLoss, String homeGoals, String awayGain, String awayLoss, String awayGoals, String vsHomeGain, String vsAwayGain, String vsGoals, String dxResult, String sfResult, String actualScore, Double pfl, String expire, Integer type) {
        this.mid = mid;
        this.title = title;
        this.lc = lc;
        this.time = time;
        this.zhud = zhud;
        this.ked = ked;
        this.homeGain = homeGain;
        this.homeLoss = homeLoss;
        this.homeGoals = homeGoals;
        this.awayGain = awayGain;
        this.awayLoss = awayLoss;
        this.awayGoals = awayGoals;
        this.vsHomeGain = vsHomeGain;
        this.vsAwayGain = vsAwayGain;
        this.vsGoals = vsGoals;
        this.dxResult = dxResult;
        this.sfResult = sfResult;
        this.actualScore = actualScore;
        this.pfl = pfl;
        this.expire = expire;
        this.type = type;
    }

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 数据id
     */
    private String mid;

    /**
     * 联赛名称
     */
    private String title;

    /**
     * 轮次
     */
    private Integer lc;

    /**
     * 比赛时间
     */
    private String time;

    /**
     * 主队
     */
    private String zhud;

    /**
     * 客队
     */
    private String ked;

    /**
     * 主队近6进球数
     */
    @Column(name = "home_gain")
    private String homeGain;

    /**
     * 主队近6失球数
     */
    @Column(name = "home_loss")
    private String homeLoss;

    /**
     * 主队近6场得失球总数
     */
    @Column(name = "home_goals")
    private String homeGoals;

    /**
     * 客队近6进球数
     */
    @Column(name = "away_gain")
    private String awayGain;

    /**
     * 客队近6失球数
     */
    @Column(name = "away_loss")
    private String awayLoss;

    /**
     * 客队近6场得失球总数
     */
    @Column(name = "away_goals")
    private String awayGoals;

    /**
     * 交手主队近6进球数
     */
    @Column(name = "vs_home_gain")
    private String vsHomeGain;

    /**
     * 交手客队近6进球数
     */
    @Column(name = "vs_away_gain")
    private String vsAwayGain;

    /**
     * 交手主客队得失球总数
     */
    @Column(name = "vs_goals")
    private String vsGoals;

    /**
     * 大小球预测结果
     */
    @Column(name = "dx_result")
    private String dxResult = "0";

    /**
     * 胜负预测结果
     */
    @Column(name = "sf_result")
    private String sfResult = "0";

    /**
     * 比赛实际比分
     */
    @Column(name = "actual_score")
    private String actualScore;

    /**
     * 赔付率
     */
    private Double pfl;

    /**
     * 未结束1，已结束0
     */
    private String expire;

    /**
     * 0 北单 1 其他
     */
    private Integer type;

    @Transient
    private DxExpect dxExpect;

    @Transient
    private SingleExpect singleExpect;
}